package com.jic.member.enums;

/**
 * @author yinhaijun
 * @date: 2020/6/6
 */
public enum TripTimingJobStatusEnum {

    WAIT_EXECUTE(1, "待执行"),
    EXECUTEING(2, "执行中"),
    ALREADY_EXECUTE(3, "已执行"),
    FAIL_EXECUTE(4, "执行失败"),
    CLOSED(5, "已关闭");

    private Integer code;

    private String message;

    TripTimingJobStatusEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public TripTimingJobStatusEnum getByCode(Integer code){
        TripTimingJobStatusEnum[] values = TripTimingJobStatusEnum.values();
        for(TripTimingJobStatusEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
